﻿package com.atn.edamame {
  import flash.errors.IllegalOperationError;
  import flash.net.*; 
  import org.flashdevelop.utils.FlashConnect;
  public class EdamameConfig {
    private static var instance:EdamameConfig = null;
    private static var internallyCalled:Boolean = false;

    public function EdamameConfig() {
      if (internallyCalled) {
		
        internallyCalled = false;
      } else {
        throw new IllegalOperationError ("Use Singleton.getInstance() to get the instance");
      }
    }

    public static function getInstance():EdamameConfig {
      if(EdamameConfig.instance == null) {
        internallyCalled = true;
        instance = new EdamameConfig();
      }
      return instance;
    }
	
	public function getApplicationURL() :String	
	{
		return "http://localhost/";
		//return "http://eup.appspot.com/";
	}
	
	public function getPyamfGateway() :String
	{
			return getApplicationURL() + "pyamf/";
	}
	
	public function getProxyURL() :String
	{
			return getApplicationURL() + "proxy?url=";
	}
  }
	
}